package trainer;

import java.util.HashSet;
import java.util.Set;

public class Vocabulary {
    private static Set<String> tagSet;
    private static String[] tags = {"<COLON>","<COMMA>","<LEFTPAR>","<PERIOD>",
            "<RIGHTPAR>","CC","CD","DT","EX","IN","JJ","JJR",
            "JJS","MD","NN","NNP","NNPS","NNS","POS","PRP","PRP$",
            "RB","RBR","RP","TO","VB","VBD","VBG","VBN","VBP","VBZ",
            "WDT","WP","WRB"};

    public static String[] getTags() {
         return tags;
    }
    
    
    public static int getNumTags() {
        return tags.length;
    }
    
    
    public static boolean isTagValid(String posTag) {
        if (tagSet == null) {
            tagSet = new HashSet<String>();
            for (String tag : getTags()) {
                tagSet.add(tag);
            }
        }
        
        return tagSet.contains(posTag);
    }

    public static String getStartSentenceTag() {
       return "<S>";
    }

    public static Object getEndSentenceTag() {
        return "<PERIOD>";
    }
}
